//
//  HTCFStringUitil.m
//  HTHappySale
//
//  Created by 创维海通 on 2017/9/14.
//  Copyright © 2017年 zxyywy. All rights reserved.
//

#import "HTCFStringUitil.h"
#import "HTCFStringUitilMacrocDefine.h"

@implementation HTCFStringUitil

+ (BOOL)stringIsNull:(NSString *)string
{
    if (![string isKindOfClass:[NSString class]]) {
        return YES;
    }
    
    if (!string || [string isKindOfClass:[NSNull class]] || string.length == 0 || [string isEqualToString:@""]) {
        return YES;
    }else{
        return NO;
    }
}

+ (BOOL)stringIsAllWhiteSpace:(NSString *)string
{
    if (HTCFStringIsNull(string)) {
        return YES;
    }else{
        
        NSString *trimString = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
        
        if (trimString.length > 0) {
            return NO;
        }else{
            return YES;
        }
    }
}

+ (UIFont *)returnFont:(float)textSize
{
    UIFont *font = [UIFont fontWithName:@"Arial" size:textSize];
    return font;
}

@end
